package Demo05.Demo01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo01_Test {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("G:\\小超\\untitled1\\wenjianjia\\a.txt");
        FileOutputStream fos = new FileOutputStream("G:\\小超\\untitled1\\wenjianjia\\c.txt");

       try {
           fos.write("HelloWorld".getBytes());
           int len = 0;
           while ((len=fis.read())!=-1){
               System.out.println((char)len);
           }
       }catch (IOException e){
            e.printStackTrace();
       }finally {
           fis.close();
           fos.close();
       }


    }
}
